home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
bbs
/
jukemb10.zip
/
DIR2DAT.NRX
< prev
next >
Wrap
Text File
|
1997-05-24
|
768b
|
37 lines
/* NetRexx file */
import RXFile
dirlist = Rexx[]
rxWork = RXFile()
rxOut = RXFile()
maximum = Rexx 0
new = int
i = int
dirlist = rxWork.filetree(".")
rxWork.delete("newdb.dat")
say "Counting maximum length"
loop i = 0 to (dirlist.length - 1)
new = dirlist[i].length
if new > maximum then
maximum = new
end
maximum = maximum + 2
rxOut.stream("newdb.dat", "c", "open")
say "Writing header"
rxOut.lineout("newdb.dat", "Active record?|Title|")
rxOut.lineout("newdb.dat", "NONE|ISAM00|")
rxOut.lineout("newdb.dat", "1|" || maximum.strip() || "|")
say "Writing records"
loop i = 0 to (dirlist.length - 1)
rxOut.lineout("Y|" || dirlist[i].right(maximum))
end
rxOut.stream("c", "close")
say "Done. Your db is named NEWDB.DAT"